/**
 * 
 */
package weather.language.forecast;

import java.util.*;

public class ConditionsGroup extends WeatherGroup
{
	public ConditionsGroup(String id)
	{
		super(id);
	}

	public ConditionsGroup(String id, Set<String> keywordsSet)
	{
		super(id, keywordsSet);
	}

	public Set<Condition> getConditions()
	{
		return conditions;
	}
	
	public void addCondition(Condition condition)
	{
		simpleAddCondition(condition);
		condition.simpleAddToGroup(this);
	}
	
	public boolean containsCondition(Condition condition)
	{
		return conditions.contains(condition);
	}
	
	@Override
	public void prepareQuestion(WeatherQuestion weatherQ) 
	{
		weatherQ.addQuestionAboutConditions(this);
	}
	
	protected void simpleAddCondition(Condition condition)
	{
		conditions.add(condition);
	}

	private Set<Condition> conditions = new HashSet<Condition>();
}
